<head>
    <title>Still Life</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
    <script type="text/javascript" src="<?php echo base_url();?>JS/imageOverlay.js" ></script>
</head>
<body>

    <div id="content_photos">	
        <div id="photos_container">
            <ul>
                <?php
                foreach ($query as $row) {
                    ?>
                    <div id="photos_container_element">
                        <li>
                            <div id="image_thumbail">
                                <a class="cell">
                                    <img src="<?php echo base_url(); ?>images/paintings/animalsAndObjects/p20<?php echo $row->id; ?>.jpg" height='150' alt='This is an image' />
                                </a>
                            </div>
                            <br />
                            <p>
                                <?php
                                if ($row->description != "") {
                                    echo $row->description;
                                }
                                ?>
                            </p>
                        </li>
                    </div>
                <?php } ?>

            </ul>
        </div>
    </div>
    <div id="content_pager">
        <?php
        foreach ($pages as $row) {
            $totalpages = ceil(($row->count) / 6);
            break;
        }
        if ($page > 1) {
            ?>
            <a href =
               "<?php echo site_url('welcome/still_life'); ?>/<?php echo ($page - 1); ?>"
               >
                <?php echo '&#171'; ?></a>

            <?php
        }
        echo '[';
        for ($i = 1; $i <= $totalpages; $i++) {
            ?>
            <a href =
               "<?php echo site_url('welcome/still_life'); ?>/<?php echo $i; ?>"
               <?php
               if ($page == $i) {
                   echo 'style="color: red"';
               }
               ?> 
               >
                <?php echo $i ?></a>
            <?php
        }
        echo ']';
        if ($page < $totalpages) {
            ?>
            <a href =
               "<?php echo site_url('welcome/still_life'); ?>/<?php echo ($page + 1); ?>"
               >
                <?php echo '&#187'; ?></a>

            <?php
        }
        ?>

    </div>